{template 'phpcms','header'}
<div id="main">
<!--面包屑导航-->
    <p id="position"><a href="">首页</a><a href="{$M[url]}">广告首页</a>广告预订</p>
<script type="text/javascript" src="images/js/validator.js"></script>
<form action="{$M[url]}add.php" method="post" name="myform" enctype="multipart/form-data">
    <table cellpadding="0" cellspacing="1" class="table_form">
      <caption>
      广告预订
      </caption>
      <tr>
        <th width="185"><strong>广告位</strong></th>
        <td>{$places[placename]}
          <input name="ads[placeid]" type="hidden" value="{$places[placeid]}"></td>
      </tr>
      <tr>
        <th><strong>名称</strong></th>
        <td><input size='40' name="ads[adsname]" type="text" require="true" datatype="limit" min="5" msg="广告名称最少5个字!">
          <font color="red">*</font></td>
      </tr>
      <tr>
        <th><strong>说明</strong></th>
        <td><input size=60 name="ads[introduce]" type='text'></td>
      </tr>
      <tr>
        <th><strong>类型</strong></th>
        <td><input type='radio' name='ads[type]' value='image' onclick="alterUC('imageid')" checked>
          图片
          <input type='radio' name='ads[type]' value='flash' onclick="alterUC('flashid')">
          FLASH
          <input type='radio' name='ads[type]' value='text' onclick="alterUC('textid')">
          文本
          <input type='radio' name='ads[type]' value='code' onclick="alterUC('codeid')">
          文字链 <font color="red">*</font> </td>
      </tr>
      <tr>
        <th><strong>内容</strong></th>
        <td><table cellpadding="0" cellspacing="0" id="table">
            <tbody id="imageid" style="display:none">
              <tr>
                <td> 上传图片：&nbsp;{$thumb}<font color="red">*</font><br/>
                  图片提示：
                  <input type="text" name="ads[alt]" size="50">
                  <br/>
                  链接地址：
                  http://<input name="ads[linkurl]" type="text" size="50" value="">
                  <font color="red">*</font><br />
                  上传图片1：{$thumb1}<br />
                  (第二张图片当广告为随屏移动广告或者对联广告的时有效) </td>
              </tr>
            </tbody>
            <tbody id="flashid" style="display:none">
              <tr>
                <td> FLASH地址：&nbsp;{$flash}<font color="red">*</font><br/>
                  背景透明：
                  <input type='radio' name='ads[wmode]' value='transparent' checked>
                  是
                  <input type='radio' name='ads[wmode]' value=''>
                  否 </td>
              </tr>
            </tbody>
            <tbody id="textid" style="display:none">
              <tr>
                <td><textarea name='ads[text]' cols='64' rows='15' id='text'></textarea>
                  <font color="red">*</font> </td>
              </tr>
            </tbody>
            <tbody id="codeid" style="display:none">
              <tr>
                <td>链接内容：
                  <input type='text' name='ads[code]' size=40>
                  <font color="red">*</font><br />
                  链接地址：
                  <input type='text' name='ads[text_link]' size=40>
                </td>
              </tr>
            </tbody>
          </table></td>
      </tr>
      <tr>
        <th><strong>起始日期</strong></th>
        <td> {$fromdate} <font color="red">*</font> </td>
      </tr>
      <tr>
        <th><strong>结束日期</strong></th>
        <td>{$todate} <font color="red">*</font></td>
      </tr>
      <tr>
        <th><strong></strong></th>
        <td><input type="submit" name="submit" value=" 我要预订 ">
          &nbsp;
          <input type="reset" name="reset" value=" 重置 ">
        </td>
      </tr>
    </table>
  </div>
</form>
<script> 
function alterUC(eID) {
	$("#table tbody").hide();
	$("#"+eID).show();
}
alterUC('imageid');
$('form').checkForm(1);
</script>
{template 'phpcms','footer'}